import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

@Entity('system_metrics')
export class SystemMetric {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  systemId: string;

  @Column()
  name: string;

  @Column('float')
  cpuUsage: number;

  @Column('float')
  memoryUsage: number;

  @Column('float')
  diskUsage: number;

  @Column('float')
  networkUsage: number;

  @Column({ nullable: true })
  region: string;

  @Column({ nullable: true })
  environment: string;

  @CreateDateColumn()
  timestamp: Date;
} 